3.114 \(\int \frac{2 a-x^2}{a^2-a x^2+x^4} \, dx\)

Optimal. Leaf size=114 \[ -\frac{\sqrt{3} \log \left (-\sqrt{3} \sqrt{a} x+a+x^2\right )}{4 \sqrt{a}}+\frac{\sqrt{3} \log \left (\sqrt{3} \sqrt{a} x+a+x^2\right )}{4 \sqrt{a}}-\frac{\tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt{a}}\right )}{2 \sqrt{a}}+\frac{\tan ^{-1}\left (\frac{2 x}{\sqrt{a}}+\sqrt{3}\right )}{2 \sqrt{a}} \]

[Out]

-ArcTan[Sqrt[3] - (2*x)/Sqrt[a]]/(2*Sqrt[a]) + ArcTan[Sqrt[3] + (2*x)/Sqrt[a]]/(
2*Sqrt[a]) - (Sqrt[3]*Log[a - Sqrt[3]*Sqrt[a]*x + x^2])/(4*Sqrt[a]) + (Sqrt[3]*L
og[a + Sqrt[3]*Sqrt[a]*x + x^2])/(4*Sqrt[a])

_______________________________________________________________________________________

Rubi [A]  time = 0.158471, antiderivative size = 114, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\frac{\sqrt{3} \log \left (-\sqrt{3} \sqrt{a} x+a+x^2\right )}{4 \sqrt{a}}+\frac{\sqrt{3} \log \left (\sqrt{3} \sqrt{a} x+a+x^2\right )}{4 \sqrt{a}}-\frac{\tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt{a}}\right )}{2 \sqrt{a}}+\frac{\tan ^{-1}\left (\frac{2 x}{\sqrt{a}}+\sqrt{3}\right )}{2 \sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Int[(2*a - x^2)/(a^2 - a*x^2 + x^4),x]

[Out]

-ArcTan[Sqrt[3] - (2*x)/Sqrt[a]]/(2*Sqrt[a]) + ArcTan[Sqrt[3] + (2*x)/Sqrt[a]]/(
2*Sqrt[a]) - (Sqrt[3]*Log[a - Sqrt[3]*Sqrt[a]*x + x^2])/(4*Sqrt[a]) + (Sqrt[3]*L
og[a + Sqrt[3]*Sqrt[a]*x + x^2])/(4*Sqrt[a])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 36.9162, size = 128, normalized size = 1.12 \[ - \frac{\sqrt{3} \log{\left (- \sqrt{3} \sqrt{a} x + a + x^{2} \right )}}{4 \sqrt{a}} + \frac{\sqrt{3} \log{\left (\sqrt{3} \sqrt{a} x + a + x^{2} \right )}}{4 \sqrt{a}} - \frac{\operatorname{atan}{\left (\frac{\sqrt{3} \left (\sqrt{a} - \frac{2 \sqrt{3} x}{3}\right )}{\sqrt{a}} \right )}}{2 \sqrt{a}} + \frac{\operatorname{atan}{\left (\frac{\sqrt{3} \left (\sqrt{a} + \frac{2 \sqrt{3} x}{3}\right )}{\sqrt{a}} \right )}}{2 \sqrt{a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((-x**2+2*a)/(x**4-a*x**2+a**2),x)

[Out]

-sqrt(3)*log(-sqrt(3)*sqrt(a)*x + a + x**2)/(4*sqrt(a)) + sqrt(3)*log(sqrt(3)*sq
rt(a)*x + a + x**2)/(4*sqrt(a)) - atan(sqrt(3)*(sqrt(a) - 2*sqrt(3)*x/3)/sqrt(a)
)/(2*sqrt(a)) + atan(sqrt(3)*(sqrt(a) + 2*sqrt(3)*x/3)/sqrt(a))/(2*sqrt(a))

_______________________________________________________________________________________

Mathematica [C]  time = 0.31148, size = 115, normalized size = 1.01 \[ \frac{\sqrt [4]{-1} \left (\sqrt{\sqrt{3}-i} \left (\sqrt{3}-3 i\right ) \tanh ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}+i} \sqrt{a}}\right )-\sqrt{\sqrt{3}+i} \left (\sqrt{3}+3 i\right ) \tan ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}-i} \sqrt{a}}\right )\right )}{2 \sqrt{6} \sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Integrate[(2*a - x^2)/(a^2 - a*x^2 + x^4),x]

[Out]

((-1)^(1/4)*(-(Sqrt[I + Sqrt[3]]*(3*I + Sqrt[3])*ArcTan[((1 + I)*x)/(Sqrt[-I + S
qrt[3]]*Sqrt[a])]) + Sqrt[-I + Sqrt[3]]*(-3*I + Sqrt[3])*ArcTanh[((1 + I)*x)/(Sq
rt[I + Sqrt[3]]*Sqrt[a])]))/(2*Sqrt[6]*Sqrt[a])

_______________________________________________________________________________________

Maple [A]  time = 0.037, size = 92, normalized size = 0.8 \[{\frac{\sqrt{3}}{4}\ln \left ( a+{x}^{2}+\sqrt{3}\sqrt{a}x \right ){\frac{1}{\sqrt{a}}}}+{\frac{1}{2}\arctan \left ({1 \left ( 2\,x+\sqrt{3}\sqrt{a} \right ){\frac{1}{\sqrt{a}}}} \right ){\frac{1}{\sqrt{a}}}}-{\frac{\sqrt{3}}{4}\ln \left ( \sqrt{3}\sqrt{a}x-{x}^{2}-a \right ){\frac{1}{\sqrt{a}}}}-{\frac{1}{2}\arctan \left ({1 \left ( \sqrt{3}\sqrt{a}-2\,x \right ){\frac{1}{\sqrt{a}}}} \right ){\frac{1}{\sqrt{a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((-x^2+2*a)/(x^4-a*x^2+a^2),x)

[Out]

1/4*ln(a+x^2+3^(1/2)*a^(1/2)*x)*3^(1/2)/a^(1/2)+1/2/a^(1/2)*arctan((2*x+3^(1/2)*
a^(1/2))/a^(1/2))-1/4/a^(1/2)*3^(1/2)*ln(3^(1/2)*a^(1/2)*x-x^2-a)-1/2/a^(1/2)*ar
ctan((3^(1/2)*a^(1/2)-2*x)/a^(1/2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ -\int \frac{x^{2} - 2 \, a}{x^{4} - a x^{2} + a^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(x^2 - 2*a)/(x^4 - a*x^2 + a^2),x, algorithm="maxima")

[Out]

-integrate((x^2 - 2*a)/(x^4 - a*x^2 + a^2), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.314934, size = 926, normalized size = 8.12 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(x^2 - 2*a)/(x^4 - a*x^2 + a^2),x, algorithm="fricas")

[Out]

-1/4*(4*sqrt(3)*a*(a^(-2))^(3/4)*arctan(sqrt(3)*a^2*(a^(-2))^(3/4)/(2*(2*a*sqrt(
a^(-2)) + 1)*sqrt((40*a*sqrt(a^(-2))*x^2 + 41*x^2 + (121*a^2*sqrt(a^(-2))*x + 12
2*a*x)*sqrt((a*sqrt(a^(-2)) + 2)/(4*a*sqrt(a^(-2)) + 5))*(a^(-2))^(1/4) + (40*a^
3*sqrt(a^(-2)) + 41*a^2)*sqrt(a^(-2)))/(40*a*sqrt(a^(-2)) + 41))*sqrt((a*sqrt(a^
(-2)) + 2)/(4*a*sqrt(a^(-2)) + 5)) + 2*(2*a*sqrt(a^(-2))*x + x)*sqrt((a*sqrt(a^(
-2)) + 2)/(4*a*sqrt(a^(-2)) + 5)) + (2*a^2*sqrt(a^(-2)) + a)*(a^(-2))^(1/4))) +
4*sqrt(3)*a*(a^(-2))^(3/4)*arctan(sqrt(3)*a^2*(a^(-2))^(3/4)/(2*(2*a*sqrt(a^(-2)
) + 1)*sqrt((40*a*sqrt(a^(-2))*x^2 + 41*x^2 - (121*a^2*sqrt(a^(-2))*x + 122*a*x)
*sqrt((a*sqrt(a^(-2)) + 2)/(4*a*sqrt(a^(-2)) + 5))*(a^(-2))^(1/4) + (40*a^3*sqrt
(a^(-2)) + 41*a^2)*sqrt(a^(-2)))/(40*a*sqrt(a^(-2)) + 41))*sqrt((a*sqrt(a^(-2))
+ 2)/(4*a*sqrt(a^(-2)) + 5)) + 2*(2*a*sqrt(a^(-2))*x + x)*sqrt((a*sqrt(a^(-2)) +
 2)/(4*a*sqrt(a^(-2)) + 5)) - (2*a^2*sqrt(a^(-2)) + a)*(a^(-2))^(1/4))) - (2*a*s
qrt(a^(-2)) + 1)*(a^(-2))^(1/4)*log(80*a*sqrt(a^(-2))*x^2 + 82*x^2 + 2*(121*a^2*
sqrt(a^(-2))*x + 122*a*x)*sqrt((a*sqrt(a^(-2)) + 2)/(4*a*sqrt(a^(-2)) + 5))*(a^(
-2))^(1/4) + 2*(40*a^3*sqrt(a^(-2)) + 41*a^2)*sqrt(a^(-2))) + (2*a*sqrt(a^(-2))
+ 1)*(a^(-2))^(1/4)*log(80*a*sqrt(a^(-2))*x^2 + 82*x^2 - 2*(121*a^2*sqrt(a^(-2))
*x + 122*a*x)*sqrt((a*sqrt(a^(-2)) + 2)/(4*a*sqrt(a^(-2)) + 5))*(a^(-2))^(1/4) +
 2*(40*a^3*sqrt(a^(-2)) + 41*a^2)*sqrt(a^(-2))))/((2*a*sqrt(a^(-2)) + 1)*sqrt((a
*sqrt(a^(-2)) + 2)/(4*a*sqrt(a^(-2)) + 5)))

_______________________________________________________________________________________

Sympy [A]  time = 1.34961, size = 27, normalized size = 0.24 \[ - \operatorname{RootSum}{\left (16 t^{4} a^{2} - 4 t^{2} a + 1, \left ( t \mapsto t \log{\left (- 2 t a + x \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((-x**2+2*a)/(x**4-a*x**2+a**2),x)

[Out]

-RootSum(16*_t**4*a**2 - 4*_t**2*a + 1, Lambda(_t, _t*log(-2*_t*a + x)))

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int -\frac{x^{2} - 2 \, a}{x^{4} - a x^{2} + a^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(x^2 - 2*a)/(x^4 - a*x^2 + a^2),x, algorithm="giac")

[Out]

integrate(-(x^2 - 2*a)/(x^4 - a*x^2 + a^2), x)